const mongoose = require("mongoose")
const Schema = mongoose.Schema

const menuSchema = new Schema(
  {
    name: {
      type: String,
      require: true
    },
    url: {
      type: String,
      require: true
    },
    createTime: {
      type: String,
      require: true
    },
    createPerson: {
      type: String,
      require: true
    },
    children: {
      type: Array,
      require: true
    }
  },
  { collection: "menu" }
)

module.exports = mongoose.model("menuModel", menuSchema)
